﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Gw2ToolNewSystem
{
    public partial class Main : Form
    {
        public Main()
        {
            InitializeComponent();
        }

        private void Main_Load(object sender, EventArgs e)
        {
            try
            {
                Sifrele.sifrecoz();
                this.BackgroundImage = Sifrele.resimListesi["main.png"];
                Class1.Image = Sifrele.resimListesi["elementalist_off.png"];
                Class2.Image = Sifrele.resimListesi["engineer_off.png"];
                Class3.Image = Sifrele.resimListesi["guardian_off.png"];
                Class4.Image = Sifrele.resimListesi["mesmer_off.png"];
                Class5.Image = Sifrele.resimListesi["necromancer_off.png"];
                Class6.Image = Sifrele.resimListesi["ranger_off.png"];
                Class7.Image = Sifrele.resimListesi["thief_off.png"];
                Class8.Image = Sifrele.resimListesi["warrior_off.png"];
                Contents.Load();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }

        private void Class1_Click(object sender, EventArgs e)
        {
            Elementalist ele = new Elementalist();
            this.Hide();
            ele.Show();
            
        }

        private void Main_FormClosed(object sender, FormClosedEventArgs e)
        {
            Application.Exit();
        }

        private void Class8_Click(object sender, EventArgs e)
        {
            Warrior war = new Warrior();
            this.Hide();
            war.Show();
        }

        private void Class2_Click(object sender, EventArgs e)
        {
            Engineer eng = new Engineer();
            this.Hide();
            eng.Show();
        }

        private void Class3_Click(object sender, EventArgs e)
        {
            Guardian guard = new Guardian();
            this.Hide();
            guard.Show();
        }

        private void Class7_Click(object sender, EventArgs e)
        {
            Thief tif = new Thief();
            this.Hide();
            tif.Show();
        }

        private void Class4_Click(object sender, EventArgs e)
        {
            Mesmer msmer = new Mesmer();
            this.Hide();
            msmer.Show();
        }
        

        private void Class5_Click(object sender, EventArgs e)
        {
            Necromancer necro = new Necromancer();
            this.Hide();
            necro.Show();
        }

        private void Class6_Click(object sender, EventArgs e)
        {
            Ranger rng = new Ranger();
            this.Hide();
            rng.Show();
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Guncelleme hkn = new Guncelleme();
            hkn.Show();
        }

        private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Tesekkurler tsk = new Tesekkurler();
            tsk.Show();
        }

        private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Efekt efe = new Efekt();
            efe.Show();
        }

        private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            DialogResult dgs = new DialogResult();
            dgs = MessageBox.Show("Hataları 'gokhanoom@gmail.com' veya http://www.guildwars2tr.com/forum adresine gönderebilirsiniz.", "Hata bildirim", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
            if (dgs == DialogResult.OK)
            {
                System.Diagnostics.Process.Start("http://www.guildwars2tr.com/forum/showthread.php?tid=1174");
            }
            else
            {

            }
        }
    }
}
